package tgc.edu.yzy.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.yzy.custom.CommonService;
import tgc.edu.yzy.entity.BookRecord;
import tgc.edu.yzy.entity.User;
import tgc.edu.yzy.repository.BookRecordReoisitory;
@Service
public class BookRecordService extends CommonService<BookRecord, Integer>{
	@Autowired
	private BookRecordReoisitory bookDAO;

	public List<BookRecord> findByUser(User user) {
		return bookDAO.findByUser(user);
	}

	public List<BookRecord> findByUserAndState(User user, String state) {
		return bookDAO.findByUserAndState(user,state);
	}
}
